import torch
# 方式一加载
import torchvision

model=torch.load("vgg16_model1.pth")
# print(model)
# 方式二加载
vgg16=torchvision.models.vgg16(weights=None)
# model=torch.load(vgg16.state_dict(),"vgg16_model1.pth")
# model=torch.load("vgg16_model2.pth")
vgg16.state_dict(torch.load("vgg16_model2.pth"))
print(vgg16)